zz_

isEven.ts

zzmq.dev@gmail.com/shirt[add-sum-numbers-function-new-file-sum-ts] / isEven.ts @ cfd6a75d Download
Ladder Summary
  • file This file defines and exports an `isEven` function that takes a number argument and returns a boolean indicating whether the number is evenly divisible by two using the modulo operator.
/**
 * Determines if a number is even.
 *
 * @param n - The number to check.
 * @returns true if n is even, false otherwise.
 */
export function isEven(n: number): boolean {
    return n % 2 === 0;
}